using System;
using System.Collections.Generic;
using System.Text;
using System.Resources;
using System.Collections;

namespace CatalogManagerDAL
{
    public class Translator
    {
        public Dictionary<string, string> DictionaryTR = null;
        private System.Web.UI.Page WebPage = new System.Web.UI.Page();

        public Translator()
        {
            DictionaryTR = new Dictionary<string, string>();

            // Create a ResXResourceReader for the file items.resx.
            ResXResourceReader rsxr = new ResXResourceReader(WebPage.Server.MapPath("~/App_GlobalResources/TranslatorDictionary.resx"));

            // Iterate through the resources and display the contents to the console.
            foreach (DictionaryEntry d in rsxr)
            {
                // Console.WriteLine(d.Key.ToString() + ":\t" + d.Value.ToString());
                DictionaryTR.Add(d.Key.ToString(), d.Value.ToString());
            }

            //Close the reader.
            rsxr.Close();
        }
    }
}
